package com.huaxin.hxcloud.find;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.huaxin.common.Entity.FindInfo;
import com.huaxin.common.view.avatarimageview.AvatarImageView;
import com.huaxin.common.view.avatarimageview.HxAvatarImageGlide;
import com.huaxin.hxcloud.R;

/**
 * @author songxf
 * @date 2017/10/25
 * @Desc 点赞Adapter
 * Copyright HUAXIN DATA. All rights reserved.
 */
public class HxPraiseAdapter extends BaseQuickAdapter<FindInfo.LikeerArrayBean, BaseViewHolder> {

    private Context mContext;

    public HxPraiseAdapter(Context context) {
        super(R.layout.item_praise);
        this.mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, FindInfo.LikeerArrayBean item) {
        AvatarImageView mHeaderImg = helper.getView(R.id.header_img);
        HxAvatarImageGlide instance = HxAvatarImageGlide.getInstance();
        instance.setHeadImage(mContext, item.getImg(), item.getNickName(), mHeaderImg);
    }
}
